package com.gydtrade.appweb.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName: User
 * @Description: 用户表 实体类
 * @author: gydtrade
 * @Date: 2023-10-11 23:13
 * @Version: V1.0.0
 */
@ApiModel(value = "User对象", description = "用户表")
@Data
@TableName("sys_user")
public class User implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(name = "account", value = "用户账号")
    @TableField("account")
    private String account;

    @ApiModelProperty(name = "pwd", value = "用户密码")
    @TableField("pwd")
    private String pwd;

    @ApiModelProperty(name = "realName", value = "真实姓名")
    @TableField("real_name")
    private String realName;

    @ApiModelProperty(name = "nickname", value = "用户昵称")
    @TableField("nickname")
    private String nickname;

    @ApiModelProperty(name = "avatar", value = "用户头像")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty(name = "salt", value = "盐加密", required = true)
    private String salt;

    @ApiModelProperty(name = "phone", value = "手机号码")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "删除标志，0=未删除（false），1=删除（true）")
    @TableField(value = "delete_flag")
    @TableLogic
    private boolean deleteFlag;

    @ApiModelProperty(value = "数据状态，0=异常，1=正常")
    @TableField("data_status")
    private Integer dataStatus;

    @ApiModelProperty(value = "排序值")
    @TableField(value = "sort_order")
    private Integer sortOrder;

    @ApiModelProperty(value = "创建者")
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新者")
    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "删除时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "delete_time")
    private Date deleteTime;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;
}
